/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package IU;

/**
 *
 * @author langeblanc
 */
public class JFPrincipal extends javax.swing.JFrame {

    /**
     * Creates new form JFPrincipal
     */
    public JFPrincipal() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDPPrincipal = new javax.swing.JDesktopPane();
        jMBPrincipal = new javax.swing.JMenuBar();
        jMPerro = new javax.swing.JMenu();
        jMIRegistrarPerro = new javax.swing.JMenuItem();
        jMPulga = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jMPerro.setText("Perro");
        jMPerro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMPerroActionPerformed(evt);
            }
        });

        jMIRegistrarPerro.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        jMIRegistrarPerro.setText("Registrar");
        jMIRegistrarPerro.setToolTipText("Registra un perro en el sistema");
        jMIRegistrarPerro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMIRegistrarPerroActionPerformed(evt);
            }
        });
        jMPerro.add(jMIRegistrarPerro);

        jMBPrincipal.add(jMPerro);

        jMPulga.setText("Pulga");
        jMBPrincipal.add(jMPulga);

        setJMenuBar(jMBPrincipal);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jDPPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 959, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jDPPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMPerroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMPerroActionPerformed
        // TODO add your handling code here:
        
    }//GEN-LAST:event_jMPerroActionPerformed

    private void jMIRegistrarPerroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIRegistrarPerroActionPerformed
        // TODO add your handling code here:
        jIFRegistrarPerro regPerro = new jIFRegistrarPerro();
        this.jDPPrincipal.add(regPerro);
        regPerro.show();
    }//GEN-LAST:event_jMIRegistrarPerroActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(JFPrincipal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JFPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane jDPPrincipal;
    private javax.swing.JMenuBar jMBPrincipal;
    private javax.swing.JMenuItem jMIRegistrarPerro;
    private javax.swing.JMenu jMPerro;
    private javax.swing.JMenu jMPulga;
    // End of variables declaration//GEN-END:variables
}
